import Observer from './Observe.js'

const prototype = Object.create(Array.prototype)

const methods = ['push', 'unshift', 'splice']

methods.forEach(method => {
    prototype[method] = function (...args) {
        new Observer(args)
        Array.prototype[method].apply(this, args)
    }
})

export default prototype
